from manim import *
from numpy import flip, insert

LV,QL,QH,JH='#75cfb8','#bbdfc8','#f0e5d8','#ffc478'

class p1(MovingCameraScene):
    def construct(self):
        # self.add(NumberPlane())
        # self.camera.frame.scale(0.7)
        rectangle=Rectangle(width=10,height=6).set_fill(JH,1)
        polygon=Polygon([-3,3,0],[5,3,0],[3,-3,0],[-5,-3,0]).set_fill(LV,1)
        bb=Brace(Line([-5,-3,0],[3,-3,0]),DOWN)
        ba=Brace(Line([3,-3,0],[5,-3,0]),DOWN)
        bh=Brace(rectangle,RIGHT)
        theta=Angle(Line([-5,-3,0],[0,-3,0]),Line([-5,-3,0],[-3,3,0]))
        self.add(rectangle,polygon,ba,bb,bh,theta)
        self.add(
            MathTex('A').next_to(ba,DOWN),
            MathTex('B').next_to(bb,DOWN),
            MathTex('H').next_to(bh),
            MathTex(r'\theta').next_to(theta,UR,buff=0.1)
        )
        self.wait()